﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Media;

namespace TrainTicketsRobot
{
    class TRSoundPlayer
    {
        ///     
        /// 播放声音文件    
        ///     
        /// 文件全名    
        public static void PlaySound(string FileName)
        {//要加载COM组件:Microsoft speech object Library    
            if (!System.IO.File.Exists(FileName))
            {
                return;
            }

            SoundPlayer SPlayer = new SoundPlayer(FileName);
            SPlayer.Play();
        }
    }
}
